package com.base.cn.platform.os.controller.integralgood;

import com.base.cn.platform.os.common.controller.BaseController;
import com.base.cn.platform.os.common.mybatis.Pagination;
import com.base.cn.platform.os.entity.integralgood.IntegralExchangeRecord;
import com.base.cn.platform.os.entity.integralgood.IntegralExchangeRecordExpand;
import com.base.cn.platform.os.service.integralgood.IntegralExchangeRecordBiz;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 积分兑换商品
 * @Author: Hello豆包
 * @Date: 2019/10/18 14:43
 */
@RestController
@RequestMapping("/manage/integralExchangeRecord/")
public class IntegralExchangeRecordController extends BaseController {

        @Autowired
        private  IntegralExchangeRecordBiz integralExchangeRecordBiz;
        /**
         * 查询分页列表
         * @param currentPage
         * @param  integralExchangeRecord
         * @return
         */
            @RequestMapping("findListPage")
            public PageInfo<IntegralExchangeRecord> findListPage(@RequestParam(value = "currentPage",required = false,defaultValue = "1") int currentPage , @RequestBody IntegralExchangeRecordExpand integralExchangeRecord){

                                Pagination page = new Pagination();
                                page.setCurrentPage(currentPage);

                        return integralExchangeRecordBiz.findListPage(page,integralExchangeRecord );
                }

    /**
     * 兑换商品发货
      * @param integralExchangeRecord
     */
    @RequestMapping("toSendExpress")
    public void toSendExpress( @RequestBody Map integralExchangeRecord){
        integralExchangeRecordBiz.toSendExpress(integralExchangeRecord);
    }



}
